﻿<%@ Page Title="" Language="C#" MasterPageFile="~/default.Master" AutoEventWireup="true" CodeBehind="AllRoomGuest.aspx.cs" Inherits="DelonixRegia.AllRoomGuest" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphPageTitle" runat="server">
    All Room Guests Report - Delonix Regia
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphTitle" runat="server">
    All Room Guests Report 
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphSubtitle" runat="server">
    Check all guests&nbsp; in Delonix Regia 
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphMain" runat="server">
    <asp:Panel ID="pnlFirstStep" runat="server">
    <div class="panel panel-default" id="firstStep" style="width: 800px; margin: 0 auto;">
        <div class="panel-heading">
            List all the guest at a particular date</div>

        <div class="panel-body">
            <div class="alert alert-danger" id="errorBox" style="display: none;">
            </div>

            <table class="nav-justified">
                
                <tr>
                    <td class="text-center" colspan="6">
                        <hr />
                    </td>
                </tr>
                <caption>
                    <div class="text-center">
                            <small>Click on a date on the calendar to view a daily report, click on "select month" and "select week" to view a weekly or monthly report</small>
                        </div><br />
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:ScriptManager ID="ScriptManager1" runat="server">
                            </asp:ScriptManager>
                            <asp:Calendar ID="Calendar1" runat="server" Caption="Select Day/Week/Month" CellSpacing="2" DayNameFormat="Full" SelectionMode="DayWeekMonth" SelectMonthText="Select Month" SelectWeekText="Select Week" Width="765px" OnDayRender="Calendar1_DayRender"></asp:Calendar>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <tr>
                        <td class="text-center" colspan="7">
                            <asp:Button ID="btnSearch" runat="server" CssClass="btn btn-default btn-lg" OnClick="btnSearch_Click" OnClientClick="return btnSearch_Click();" Text="Search" />
                        </td>
                    </tr>
                </caption>
                </table>
        </div>
    </div>
</asp:Panel>

    <asp:Panel ID="pnlSecondStep" runat="server">
    <div class="panel panel-default" id="secondStep" style="display:none; width: 800px; margin: 0 auto;" aria-busy="True">
        <div class="panel-heading">
            All guest in room      </div>
              <div class="panel-body">
            <div class="alert alert-danger" id="errorbox2" style="display: none;">
            </div>

            <table class="nav-justified" style="width: 800px">
                <tr>
                    <td>
                        <%--<asp:Button ID="PrintBut" runat="server" CssClass="btn btn-default btn-lg" OnClick="PrintBut_Click" Text="Print Report" />--%>
                        <asp:Button ID="PrintBut" runat="server" CssClass="btn btn-default btn-lg" OnClientClick="doPrint()" Text="Print Report" />
                            &nbsp<asp:Button ID="ExcelBut" runat="server" CssClass="btn btn-default btn-lg" OnClick="ExcelBut_Click" Text="Export to Excel" />
                            &nbsp<asp:Button ID="PDFBut" runat="server" CssClass="btn btn-default btn-lg" OnClick="PDFBut_Click" Text="Export to PDF" />
                        <br />
                        <br />
                        <asp:GridView ID="gvAllGuests" runat="server" Width="745px" class="table table-bordered" AutoGenerateColumns="False" Caption="All Guests in Rooms">
                            <Columns>
                                <asp:BoundField DataField="room_ID" HeaderText="Room Number" />
                                <asp:BoundField DataField="adults_No" HeaderText="Number of Adults" />
                                <asp:BoundField DataField="children_No" HeaderText="Number of Children" />
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td class="text-center" style="height: 22px"><a href="AllRoomGuest.aspx">&lt; Go back</a></td>
                </tr>
            </table>
        </div>
    </div>
        </asp:Panel>

    <script type="text/javascript">
        function transitionToSecondStep() {
            //$('#firstStep').hide('slide', { direction: 'left', easing: 'easeOutQuart', duration: 250 });
            $('#secondStep').delay(250).show('slide', { direction: 'right', easing: 'easeOutQuart', duration: 250 });
        }
    </script>

    <script>
        function doPrint() {
            var prtContent = document.getElementById('<%= gvAllGuests.ClientID %>');
            prtContent.border = 0; //set no border here
            var WinPrint = window.open('', '', 'left=100,top=100,width=1000,height=1000,toolbar=0,scrollbars=1,status=0,resizable=1');
            WinPrint.document.write(prtContent.outerHTML);
            WinPrint.document.close();
            WinPrint.focus();
            WinPrint.print();
            WinPrint.close();
        }
    </script>
</asp:Content>
